<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="com.icss.utils.RecordSet" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title>就业信息列表</title>

<link type="text/css" rel="stylesheet" href="<%=basePath%>css/jiuye.css">
<script type="text/javascript" src="<%=basePath%>js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/deleteConfirm.js"></script>
<script type="text/javascript">
			function selectAll() {
			
				if ($("#all").attr('checked') == true) {
					$("input[name='jobInfoIds']").attr("checked", true);
				} else {
					$("input[name='jobInfoIds']").attr("checked", false);
				}
			
			}
			
			function submitConfirm() {
				var checkedBoxes = $("input:checked");
				if (checkedBoxes.length == 0) {
					alert('你没有选择任何要删除的数据！');
				} else {
					if (confirm('你确定要批量删除吗？')) {
						document.batchDelete.submit();
					}
				
				}
			}
		
		</script>

</head>
<body>
<form action="jobInfo?action=admin_list" method="post">
<div><input type="text" name="typeArg"> 搜索条件： <select
	name="type">
	<option value="byName">姓名</option>
	<option value="byClass">班级</option>
	<option value="byCompany">就职公司</option>
</select> <input type="submit" value="搜索"></div>
</form>
<div class="container">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
		<td></td>
	</tr>

	<tr>
		<td>
		<div class="header">
		<div class="header_left">学员就业信息列表</div>

		<div class="header_right"><input type="checkbox" id="all"
			onclick="selectAll()"> 全选 &nbsp;&nbsp; <a
			href="javascript:submitConfirm();">删除选中</a>&nbsp;&nbsp;&nbsp; <a
			href="<%=basePath%>/page/jiuye/addJiuye.jsp">添加学员就业信息</a></div>
		</div>
		</td>
	</tr>

	<tr>
		<td><c:choose>
			<c:when test="${empty requestScope.jobInfos}">
				<font color="red">没有搜索到任何结果</font>
			</c:when>
			<c:otherwise>
				<form name="batchDelete" method="post"
					action="<%=basePath%>jobInfo?action=batchingDelete&role=officeAdmin">
				<c:forEach items="${requestScope.jobInfos}" var="jobInfo"
					varStatus="status">

					<div>

					<div class="date"><input type="checkbox" name="jobInfoIds"
						value="${jobInfo.JOBINFOID }"> 姓名：${jobInfo.USERNAME}
					&nbsp; &nbsp;班级：${jobInfo.CLASSNAME }&nbsp;&nbsp;
					就职公司：${jobInfo.WORKINGCOMPANY }&nbsp;&nbsp;
					&nbsp;&nbsp;年薪：${jobInfo.SALARY
					}元(人民币)&nbsp;&nbsp;就职时间：${jobInfo.ENTERCOMPANYTIME } ~ <c:choose>
						<c:when test="${empty jobInfo.LEAVECOMPANYTIME}">
										至今
									</c:when>
						<c:otherwise>
										${jobInfo.LEAVECOMPANYTIME }
										</c:otherwise>
					</c:choose></div>
					<div class="opt"><a
						href="<%=basePath%>jobInfo?action=updateRequest&jobInfoID=${jobInfo.JOBINFOID }&role=officeAdmin">编辑</a>|
					<a
						href="javascript:deleteJobInfo(${jobInfo.JOBINFOID },'officeAdmin')">删除</a>|

					<c:choose>
						<c:when test="${jobInfo.VISIABLE}">
							<a
								href="jobInfo?action=setPublic&visiable=0&jobInfoID=${jobInfo.JOBINFOID }&role=officeAdmin">设置为不公开</a>
						</c:when>

						<c:otherwise>
							<a
								href="jobInfo?action=setPublic&visiable=1&jobInfoID=${jobInfo.JOBINFOID }&role=officeAdmin">设置为公开</a>
						</c:otherwise>
					</c:choose></div>

					<c:choose>
						<c:when test="${!status.last}">

							<div class="line"></div>
						</c:when>
						<c:otherwise>
						</c:otherwise>

					</c:choose></div>

				</c:forEach></form>
			</c:otherwise>
		</c:choose></td>
	</tr>
</table>
</div>


<c:if test="${empty requestScope.jobInfos == false}">
	<div style="margin-top: 10px">
	<%
				RecordSet rs = (RecordSet) request.getAttribute("jobInfos");
				%> <a
		href="jobInfo?action=admin_list&currentPage=<%=rs.currentPage - 1%>">上一页</a>
	<font color="red"><%=rs.currentPage%> </font>/ <%=rs.totalPage%> <a
		href="jobInfo?action=admin_list&currentPage=<%=rs.currentPage + 1%>">下一页</a>
	</div>
</c:if>


</body>


</html>
